 <!-- Example table --> <div class="container_12"> 
      <div class="module">
                     <h2><span><?php echo $_title;?></span></h2>
                        
                     <div class="module-body">
                         <div style="margin-top:13px;">
                        <?php
                        if(isset($errMsg)){?>
                        <span class="notification"><?php echo $_MESSESGE[$errMsg];?></span>
                        <?php }?></div>
                        
                        <form id="adminForm" name="adminForm" action="" method="post">
                            <p>
                                <label>Display Name<span class="star">*</span></label>
                                <input type="text" class="input-short" name="name" value="<?php echo $result['name'];?>" />
                                <!-- <span class="notification-input ni-correct">This is correct, thanks!</span> -->
                            </p>
                            
                            <p>
                                <label>User Name<span class="star">*</span></label>
                                <div id="availability_info_loginid"></div>
                                <input type="text" class="input-short" name="username" id="username" value="<?php echo $result['username'];?>" />
                                <!-- <span class="notification-input ni-correct">This is correct, thanks!</span> -->
                            </p>
                            
                            <p>
                                <label>Password<span class="star">*</span></label>
                                <input type="text" class="input-short" name="password" value="<?php echo $result['password'];?>" />
                                <!-- <span class="notification-input ni-correct">This is correct, thanks!</span> -->
                            </p>
                            
                            <p>
                                <label>Email</label>
                                <input type="text" class="input-short" name="email" value="<?php echo $result['email'];?>" />
                                <!-- <span class="notification-input ni-correct">This is correct, thanks!</span> -->
                            </p>
                            
                           <p>                                
                                <label>Select Role<span class="star">*</span></label>
                                <?php   
                                $groupData = CommonUtility::getData($parm=null, 'access_group', array('status'=>'1'));
                                if( $groupData ){  
                                    echo '<select class="input-short" name="access_group">';
                                    $selval = $result['access_group'];
                                    foreach( $groupData as $row )  {
                                        $sel = $selval==$row['id'] ? 'selected' : '';
                                        echo '<option value="'.$row['id'].'" '.$sel.'>'.$row['group_name'].'</option>';
                                    }   
                                    echo '</select>';
                                }                                                        
                                ?>
                            </p>                            
    
                            
                            <fieldset>
                                <input class="submit-green" type="submit" name="submit" value="Submit" /> 
                                <input class="submit-gray" type="button" value="Cancel" onclick="javascript: window.location='<?php echo _SITE_ADMIN_URL_?>'+'admin-users/user_mng.php';" />
                            </fieldset>
                        </form>
                     </div> <!-- End .module-body -->

                </div>  <!-- End .module -->
                </div>
                <div style="clear:both;"></div>

                <script type="text/javascript">
$().ready(function() {
    var root_path = '<?php echo _SITE_ADMIN_URL_?>';
    var table = 'admin';
    var field = 'username';
    var item_col = 'id';
    var item_value = '<?php echo $_REQUEST['id'];?>';
        $('#username').keyup(function(){ 
            var field_value = $(this).val();
            path = root_path+'ajax/getGeo.php?type=check_availability&table='+table+'&field='+field+'&field_value='+field_value+'&item_col='+item_col+'&item_value='+item_value;
            $.ajax({url: path,    
                success: function(response) {
                    $('#availability_loading').hide();
                    $('#availability_info_loginid').html(response);
                }
            });
        });
        
    $("#adminForm").validate({
        rules: {
            username: "required",
            password: "required",
            name: "required",
            access_group: "required"
        },
        messages: {
            username: "Please enter user name.",
            password: "Please enter password.",
            name: "Please enter display name",
            access_group: "Please select role for the user."
        }
    });
});
</script>                                                